/* IMPLEMENATION OF K-MEANS FOR PURE DATA: UNSUPERVISIONED MACHINE LEARNING ALGORITHM
 * FOR DATA CLUSTERIZATION.
 *  
 *  by Adriano Monteiro, december, 27, 2012. contact: monteiro.adc@gmaill.com
 *  
 */

#include "m_pd.h"
#include <stdlib.h>
#include <math.h>


static t_class *wav2aud_class;

#define L 26
#define M 129

double COCHBA(char part, int l, int m){

static double r_COCHBA[L][M] = {22,22,24,22,20,19,21,19,18,18,17,16,14,15,14,15,15,14,13,12,14,14,12,12,12,12,11,12,11,10,10,9,10,10,9,9,9,9,8,10,11,13,12,11,12,12,10,10,10,9,11,9,10,8,8,9,13,9,10,9,8,9,8,8,8,8,8,8,10,7,9,7,7,7,7,9,9,7,7,7,7,8,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
		0.002922702370924,0.0030077933712035006,0.003096305303845102,0.0031870724733638659,0.0032798343912230697,0.0033755683203981687,0.0034748531491716138,0.0035768606901020058,0.003681174017249792,0.0037891752742250633,0.003899817413515146,0.004012958552181917,0.0041314679663146522,0.0042518501266592202,0.0043764929649280256,0.0045051256151518709,0.0046366749095691131,0.0047727375067166348,0.0049114223155274301,0.0050558198906147872,0.0052037821398024445,0.0053561054855763195,0.0055131906120856672,0.0056741916127502345,0.0058403962630331789,0.0060113819292417076,0.0061874942882235431,0.0063685292147444544,0.006555000511005226,0.0067472011832861688,0.0069444544368670496,0.007147985196709959,0.0073570716525024685,0.0075725140682627269,0.00779426225397518,0.0080225058232301569,0.0082574322633038565,0.0084992341806383008,0.0087481694404381218,0.0090043028650274425,0.0092679050930154633,0.0095387134656797958,0.0098180493251876638,0.010105518723070386,0.010401702343525448,0.010706360764409556,0.011019983061424606,0.011342684053018477,0.011674809605876401,0.012016768016186693,0.012368939979889275,0.012731110259443691,0.013104087627313903,0.013488211223522074,0.013883235432650534,0.01428956300702691,0.014708871632948798,0.01513914121315736,0.015582866365752854,0.016039167610628974,0.016509043423932619,0.016992654567958471,0.017490382887311341,0.018002801871347542,0.018530247330330884,0.01907309360533917,0.019631812674887283,0.02020704580014808,0.020799228593362543,0.021408069138847439,0.022035762449323402,0.022680865075292645,0.023345276285170854,0.024029223769868876,0.02473324982735408,0.025266877519276188,0.026119626385565118,0.026971326718357773,0.02776150481878209,0.028574832167526081,0.029412015253390811,0.030274089077495257,0.031160624794900074,0.03207355223470354,0.033013225045182712,0.033980428379136361,0.034975974256593136,0.036000683102600767,0.037055420483838496,0.038141054063309157,0.039258494987621163,0.040408660399336542,0.041592538121283516,0.042811072631285918,0.044065312790444573,0.045356298105370792,0.046685077603540216,0.048052772145086568,0.049460507376475032,0.050909463403603361,0.052400824682688397,0.053935827777297947,0.055515724769871599,0.057141833173009575,0.05881545359024596,0.060537968919834755,0.06231083604124197,0.064135492141781839,0.06601283898487538,0.067945022997082175,0.069933273628054515,0.071979034777167245,0.074083907270432264,0.076248930501411377,0.07847583135058088,0.080765750231005268,0.083119798525927976,0.0855388766167164,0.088023604573773451,0.090574101108647817,0.093190131391405084,0.095870749841824532,0.098614640254023597,0.10142065780185319,0.10429002786485386,0.10723144780220123,0.11027237226271933,0.11347791761172936,0.11697527774789014,
		-0.0017264897038156517,-0.0017859992350438892,-0.0014378623610898434,-0.0019262328223504167,-0.0024869747747234511,-0.0028125124765801734,-0.0023349357137738167,-0.0030781963613555011,-0.0034842062679489548,-0.0036411074560964984,-0.0041813613049067402,-0.0047550967491696841,-0.0062214367131608805,-0.00562815068752284,-0.0065466755887488631,-0.0060901881001169944,-0.0062271293664374018,-0.0072609939005490055,-0.0083207875383485806,-0.0096823528173646395,-0.0078231665764389169,-0.0080364421495137811,-0.010638218283893523,-0.010896271571932013,-0.011211482936421987,-0.011523088534535316,-0.013540052105600119,-0.012162256174446145,-0.014281859466509974,-0.016924445566088103,-0.017327947916918843,-0.02063048345673564,-0.018303642035214573,-0.018804872688294918,-0.022389293049379491,-0.023025832396308413,-0.023665803932620313,-0.024295266805491152,-0.029315790715995479,-0.022044658820086854,-0.027641873336005426,-0.024268829684361306,-0.028097000284123458,-0.032634493780328906,-0.029432391198158277,-0.030260701020261762,-0.039555943904047978,-0.041181927698180944,-0.042468502789292477,-0.049851994742978058,-0.038416028930623972,-0.052481024294056544,-0.046676525188992485,-0.062536469126612954,-0.064688805609204106,-0.058020536938581474,-0.051647920362894804,-0.06055402465933072,-0.070738680572385471,-0.062781651097660096,-0.075885268902527975,-0.071075550207799459,-0.080190386674987207,-0.081623338492861436,-0.082850306573274662,-0.084587843331023635,-0.08686605880245965,-0.11389245312453349,-0.096080651695155103,-0.11187210650928793,-0.11548791598524155,-0.1150726319158098,-0.11867288810496436,-0.12058616138700892,-0.12161114546602037,-0.17194699895026605,-0.17546863662207826,-0.1294800524388805,-0.1316903807931514,-0.13383654289260252,-0.13590796473439271,-0.16191866898102217,-0.13977796927068356,-0.14148510658265021,-0.14312575925581569,-0.14466102418415289,-0.14592242162395777,-0.1470266638944899,-0.14791831394744709,-0.1485722912352751,-0.14894245991074034,-0.14949935362209479,-0.1487008298765119,-0.1484501780830883,-0.14786466198929793,-0.14565135854733316,-0.14405324217353191,-0.1415468865334566,-0.13923688972282813,-0.13497186969741348,-0.13089621509374647,-0.12557227660422812,-0.12083820836293416,-0.11357945794568647,-0.10765626428894332,-0.09884112698898026,-0.1034559303099522,-0.064899149031745679,-0.072883752180118305,-0.058433055310067129,-0.043191219048490173,-0.028755502265434219,-0.022151336294742641,0.0034919198147068931,0.02207629354710839,0.041139973804583688,0.063080759103807282,0.085376732201369362,0.10433098670153375,0.13441607615536563,0.1581599268636574,0.18706300258489703,0.21450364883170664,0.24619562836547851,0.27576978694171811,0.30747815774099502,0.34052270225189779,0.19194007817053751,0.20328096675553614,
		-0.0026102130540839449,-0.0026806047525878523,-0.0025923434644991518,-0.0028437927884575145,-0.0030481100724948501,-0.0031815662486332327,-0.0031687110681209384,-0.00334704134514845,-0.0034557554856367999,-0.0035327988907378968,-0.003571781135168949,-0.003559720783282364,-0.0029661929869705429,-0.0035341565273031531,-0.0031720698608091197,-0.0036236686215673493,-0.0037527402800615296,-0.0032981236400657062,-0.0026830285664079549,-0.0015611281905990623,-0.0036581546149583454,-0.0037701154979845925,-0.0015166575141366996,-0.0016216030304907288,-0.0016556312658081557,-0.001710468813743489,0.00065149302027742845,-0.0018364004469989862,0.00062569258035211712,0.0046919064909722967,0.0046534332159215196,0.011136859754785957,0.00489120745279506,0.0050000796198740047,0.01201959528190945,0.012386536913191311,0.012724431256177794,0.01298741539512686,0.025757986378460669,0.0056287137960313134,0.015931837239633619,0.0062821249413340099,0.013172063058016536,0.023153786038880905,0.013503865299278614,0.01396894048253767,0.03795200441206692,0.040802480505782522,0.042205580343355316,0.066381045064512756,0.025715671751081453,0.069687478578660728,0.045031927649078894,0.10661970979755447,0.11129272706120664,0.075753736007030115,0.045496024073349926,0.077873984005367422,0.11473165168303864,0.078613642873596415,0.12976135425272062,0.1047006085226873,0.13714930247763404,0.13797834909974382,0.13804182888732663,0.13975076781441137,0.14354619672305099,0.28115058281401512,0.16194833058227728,0.24899102785294716,0.24340158543033649,0.24946107465046263,0.25827817367887007,0.25960058141409648,0.25708718525594804,0.52321888556342799,0.528477677236871,0.26919927253491227,0.27128699079478807,0.27302194103512523,0.27437483201123375,0.39270148521991555,0.27580720800436237,0.2755758828892666,0.27506734019077939,0.27415052356502279,0.2722451678959531,0.26981063523994647,0.26668611375328444,0.26282790142462026,0.25813212158942728,0.25411357752468583,0.24605283647353562,0.23984735731653387,0.23281606430322183,0.22154560959560721,0.21229469286784447,0.20105140389882256,0.19063986166317451,0.17616771614889931,0.16273184079880906,0.14737477946541375,0.13379110266945091,0.11646402971994316,0.1021352081836244,0.084365978867035132,0.082884128500621865,0.061096920221361296,0.037537066362769878,0.019252999159921468,0.0027232650997507206,-0.011276844032426448,-0.022918468986061029,-0.034225743314344227,-0.042290319589347064,-0.047674649604604241,-0.048954583078475056,-0.046700421482879874,-0.044388799820906502,-0.027792606384462532,-0.013780879165457356,0.011130318486213372,0.038626729212000867,0.07822405776051998,0.11944258595586907,0.17020357575130654,0.22950037639133863,-0.1276379197421417,-0.12435528035888764,
		-0.0016630599924621419,-0.0016979004444906594,-0.0019658215452408785,-0.0017634126869081703,-0.0014198010121800773,-0.0012354450879145157,-0.0017498119821556979,-0.0011798120386489895,-0.00088476763571210986,-0.00083354726362081595,-0.00034360080160398556,0.00022467419494455419,0.0021357123451505753,0.0010669578576997154,0.0022105666361285892,0.0013338382057930835,0.0013125687049510596,0.0026060042499309044,0.0039324325336161188,0.0057337039521459607,0.0027147119567489295,0.0027811943159148835,0.0063359996672170092,0.0064403032611940279,0.0066283699124087356,0.0068071366905851768,0.0091591577397954725,0.0071652482761980808,0.0096384531903479197,0.011968218923438242,0.01224996731705775,0.013320227905586979,0.012915502686976438,0.013263311107644669,0.014359358934047821,0.014705743762716069,0.015072273346908667,0.015506349282909244,0.011007978873684387,0.015467670462156361,0.018042986700379238,0.017601991378238941,0.019693876655337225,0.019338167902433548,0.020470806363878265,0.020880374827914428,0.014633218496326475,0.013343375927999602,0.013773372695899202,-0.0076203894081935597,0.022475227156011125,-0.0086115062509484041,0.015982926804356215,-0.061764563883693023,-0.066425733378990048,-0.0081696846330403285,0.024056313574349588,-0.0078950041900035586,-0.052281548792314128,-0.0060190767660984667,-0.078628698338272615,-0.040431539376729837,-0.083737240967535029,-0.08263611038115376,-0.080823471082129741,-0.080545711057158978,-0.083552025447760012,-0.39594221723440209,-0.085239322507895079,-0.30178669297759131,-0.23505380957833366,-0.29536130867771543,-0.30813943873413857,-0.3070923931568727,-0.29928217064935758,-0.93137230236113833,-0.9342733639439359,-0.31174700612213674,-0.31261270328917512,-0.31299315151968105,-0.31286386759012391,-0.56242080319319476,-0.31098079224939756,-0.3087707007150528,-0.30636521391672522,-0.30357429706052924,-0.29949917600244236,-0.29494332518353905,-0.28970078509075103,-0.28376269099456125,-0.27703671312244388,-0.27180716815461725,-0.26126960855696463,-0.25403363146112923,-0.24626149600615529,-0.23354301031833116,-0.22434800567313498,-0.21347603819999192,-0.20452314225411999,-0.19179340363776637,-0.18141294319857368,-0.17016598503214483,-0.16196666254476658,-0.15147541200099932,-0.1450989353074833,-0.13729612763844776,-0.14159996363110591,-0.14580509446741433,-0.12785052835085498,-0.12727303157120376,-0.12969598074191052,-0.1350638297462835,-0.13938570893064722,-0.15348789489625911,-0.16675393741029079,-0.1819463893378,-0.20004447851240637,-0.21911440775779997,-0.2358228797743479,-0.25934535790161894,-0.2769956350337085,-0.29482263095683842,-0.30793520593878232,-0.31727160860711018,-0.3192612027193219,-0.31340023602161049,-0.29753853596560081,-0.33197505456126181,-0.33669465271706778,
		-0.00017499771693462181,-0.00016994911369538516,-0.00066273840294885956,-0.00012564622866721603,0.00053981048245822934,0.00091523858914638258,0.00017911290500208604,0.0011027933398138896,0.0015712296876188778,0.0016809209928990052,0.0022892898690754426,0.0029048477569712629,0.004259364721287605,0.0037437118321304121,0.0044775197003133205,0.0040295192807676935,0.0041093617198892356,0.004871513205709623,0.0053654477417202492,0.0055285968783497196,0.0052539292318848126,0.0053978226335755523,0.0058632264520203847,0.0060433817093054655,0.0061959611275030921,0.0063654159795843409,0.0052201608024622327,0.0067204760465018384,0.005539150102996793,0.0019930574977117558,0.0022408052972717088,-0.0049869389529638829,0.0023414109576635612,0.0024065015181060443,-0.0053164724518221613,-0.0055181781407836975,-0.0056613911790454313,-0.0057785969101912787,-0.019564181884538647,0.0028818703634853095,-0.0069482401301316117,0.0047500832650071104,-0.0019896951239286491,-0.013066581505969019,-0.0018975638062409491,-0.0021060305772335813,-0.028341668828401452,-0.03007203424595567,-0.031353392899345002,-0.048160384803445956,-0.013771362867681828,-0.049376482564640146,-0.033459705090082455,-0.038472202858467808,-0.03738566705435642,-0.05432582250264438,-0.030008798541788777,-0.055132876107360819,-0.059180689770896688,-0.056076427292065377,-0.040789908499125817,-0.051506647828600767,-0.042557122407249841,-0.043997208057939961,-0.045040151770384999,-0.047097345523823816,-0.04691156165478081,0.34607362953434484,-0.072821674070959075,0.20661518837864293,0.033859289158004277,0.19711324635132951,0.20854240002389404,0.20620261311309535,0.19743716005100687,1.0582340169665863,1.0585512029005471,0.20689591406852917,0.20707838644490228,0.20692337840053965,0.2064161002092795,0.50966147750864865,0.20429452595040495,0.20224653443740717,0.20019438489036112,0.19795198509733472,0.19464125334935972,0.191050957028253,0.18697534348792888,0.18239804197570283,0.17721624271247444,0.17363195825611585,0.16500002515021897,0.15966744624343632,0.15386818710399666,0.14315814103858807,0.13585735702538254,0.12670042237457385,0.11928931688516496,0.10746585320299767,0.097586197615674428,0.085898930784505625,0.076937082179395141,0.063625226868707987,0.054507560711415069,0.04084311514225844,0.05351781096597566,0.0026105112845447795,0.0086311668902040121,-0.0097848875660830441,-0.028356114259360462,-0.044340331428828622,-0.044416930183040569,-0.079052201363985705,-0.09946460042415245,-0.11985983045132309,-0.14525968050196061,-0.17066181569053873,-0.18717491405205669,-0.22900891613097091,-0.25455968520314998,-0.29199524570291568,-0.32418873192240882,-0.36617838728543672,-0.40006539734569346,-0.43673455240235415,-0.47261632466651049,-0.0095685445050565799,-0.0042011900035653863,
		0.0010862629305284336,0.0011165042209488401,0.00061268331730278424,0.001228433668228482,0.0018605026454956224,0.0022066867119823852,0.0016405383693348175,0.0023863978840113725,0.0027327179505132779,0.0028150771427676033,0.0031186436807258315,0.0033225135067986582,0.0028936332303229079,0.0034688983669121419,0.0030927152971925351,0.0035227855366501155,0.0036455856379507116,0.0031403448441261342,0.0022710801878999968,0.00040724994256347865,0.0034900961951441047,0.0035888028557593886,0.0001968188954176993,0.00030820052888443772,0.000291783102645677,0.0002919635823501797,-0.0032619836909069579,0.00031741518176047612,-0.0033926433680645527,-0.0082923305415947991,-0.0083680833922599868,-0.012378196230130076,-0.0088092159134109341,-0.0090510363544645187,-0.013245961720424707,-0.013517912248892577,-0.013874687950844141,-0.014235010028031186,-0.0085635826370616588,-0.010534151179197386,-0.017627077829126273,-0.01070326467642257,-0.016929670354612965,-0.020614195894663675,-0.017305617494354095,-0.017637829384477763,-0.016895302388786226,-0.015343066853953499,-0.015920726329262731,0.014009851576417509,-0.022929733366091092,0.01489265949754414,-0.017780464198963283,0.07306234937403,0.074981258548445784,0.015758047697115043,-0.029673331095802016,0.015593689662098627,0.062915927140114736,0.01441159798626801,0.086239263168855787,0.055857548431889344,0.092243434357774351,0.092220609239315854,0.090984627793463585,0.092948161861109796,0.094819772236156522,-0.19211065887175752,0.092871720803908889,-0.071020988393897352,0.15446976823399658,-0.064695889458249015,-0.070641478927233381,-0.068974589060190689,-0.063995981023145507,-0.77963003843904843,-0.78221170182286781,-0.068735311096861054,-0.068880591554254147,-0.068932460049289032,-0.068887770942031495,-0.29035331765173822,-0.068509941152145745,-0.067936653648101239,-0.067496178630460202,-0.067083940457978608,-0.066197531475947452,-0.065297479892299157,-0.064268177570661944,-0.063103027518365815,-0.06174594686681413,-0.06142193374110011,-0.058443868832207119,-0.057421585293298258,-0.056254865969276646,-0.052640030799555822,-0.050929550751796497,-0.048399447107098238,-0.046776395108871986,-0.043260298649692872,-0.040722851200933059,-0.037616796141283312,-0.03550827333397065,-0.03222008161884727,-0.029978661360072854,-0.027009366615971003,-0.023794767254963455,-0.071832455648035559,-0.018325749105080114,-0.016618106830331662,-0.015804520175804707,-0.014436889939549027,-0.0050407464137268232,-0.01288265067394309,-0.013673525444439592,-0.014297051060342779,-0.018050543571405939,-0.021700334671215297,-0.019343088897703472,-0.034229904668360421,-0.038171703923113622,-0.051314376690772948,-0.061759499514926458,-0.080929115589559411,-0.096361405587717566,-0.11680021265549073,-0.14037913429165025,0.16109413740046447,0.16467855782963817,
		0.0017585929169530432,0.0017964703431540298,0.0014794167348912794,0.0019176062070849207,0.0022195139033737363,0.0023536443215651502,0.0022409641531024233,0.0024232764829792614,0.0024439545543933332,0.0024516500703819846,0.002247570393015983,0.0018811964962306906,-0.00017129107486183641,0.0011723107904446238,-0.00012411749366609233,0.00097758026298478285,0.0010759752254634676,-0.00040616012848989985,-0.0019777204423870516,-0.0042317402487289544,-0.00029511216328340458,-0.00030389602773617973,-0.0046698570419906674,-0.004691893608876058,-0.0048416819302596831,-0.0049699351906540004,-0.0069982445281938348,-0.0052412957005102106,-0.0073587962855399874,-0.0067847528270429053,-0.0070869476983991733,8.4700160543963322e-005,-0.0074439105468090128,-0.0076142394876926372,-1.1706852449594882e-005,2.4625523397676744e-005,8.3240430116117401e-005,3.104708271557258e-005,0.017212124491974883,-0.0088063198262309673,-0.0025402173261856809,-0.012536918134313952,-0.0094485162453496283,0.0012506295940665766,-0.0097370581497593419,-0.0097322168117633737,0.02059664581237132,0.021472008345115555,0.022788539064763184,0.036775434684969202,0.00077288487721138615,0.036786857154678679,0.024225537528969592,-0.034450654571633411,-0.036082538558625692,0.040962814400903241,0.010910022468382586,0.040863599285844841,0.024485105927631413,0.041485872778727513,-0.043028206179011694,-0.010168622819723824,-0.047394540312566846,-0.046481500883325769,-0.044710535571547541,-0.045525169740694031,-0.047099774981106665,0.06733518533912182,0.025746664604317546,0.0049578211225935693,-0.15835572453656904,0.0026573977947835252,0.0040861293205192916,0.0033871448988226334,0.001882408533088462,0.3553124464553124,0.36156468488136517,0.0026460433345573075,0.0025717215180950633,0.0024990065364833311,0.0024295419121659911,0.093165636510157496,0.002318343419754878,0.0022023774709568353,0.0021853339727279427,0.0022385619501919334,0.0021898982365941549,0.0022069798718648663,0.0022549044254770167,0.0023377318430386784,0.0024401562079504266,0.0030633164148056568,0.0027189421744212962,0.0033059136234710761,0.0039891323155644377,0.0036754917337091008,0.0044004711416431195,0.0048746750737892813,0.0060448406381715695,0.0062581395544998464,0.0072439446017466208,0.0079659624820446889,0.009764529315864072,0.010538030695513253,0.012910940949783021,0.014174936143642874,0.024643195284320452,0.0099011040450593651,0.022812377139582639,0.024191270223969455,0.025832331763651569,0.028822863620619005,0.035570865889585357,0.035521017218234405,0.038846388856936073,0.042663840475816561,0.045868913869075982,0.049520484031371895,0.054271185332783474,0.056405035221983972,0.060452933623713789,0.062987459324462813,0.065845560872865264,0.067561759206642424,0.069587450028973694,0.070934611654605156,0.0719909682903149,0.021024685232004445,0.01782024391998736,
		0.0017743060555508124,0.0018056924285822582,0.0017962658803336367,0.0018858202334394202,0.001713638271966337,0.0015562655169561207,0.0019826639160209956,0.0014833297040922028,0.0011462293410770888,0.001080518860979192,0.00045142259132111787,-0.00030042212395995504,-0.0027116683365674466,-0.0014710542331910562,-0.0027898351988214398,-0.0017619685629392554,-0.0017328561612858472,-0.0031636243559059526,-0.0041584739777761398,-0.0045898192618562964,-0.0033287119815634848,-0.0034198364820249741,-0.0047864459263034145,-0.0049262031227258248,-0.0050456647456866037,-0.0051765194436013077,-0.002981736939628798,-0.0054539381963203916,-0.0031801690617227628,0.003186168994776264,0.0030081160353425205,0.010449744193920529,0.003204154420826162,0.0032869093346282112,0.011066201151160325,0.011300145306441176,0.011553510226375071,0.011917271659587295,-0.0048380934358042832,0.0038649249146976653,0.013856242550256723,-0.0014544368001982722,0.0080341073244023422,0.018134974962711135,0.0080138753200418352,0.0082627659620734435,0.016201200566758875,0.015010873241246671,0.015573162685327919,-0.029284701821961672,0.019402399635411089,-0.029167741337102527,0.016988853595544334,0.0024415383058745987,0.0027580641784297213,-0.032576447171155667,0.030450839664827166,-0.031660923867932671,-0.066081156541247937,-0.030928791764891495,0.0038430058735672594,-0.0042739655095479475,0.0050105531392461355,0.0043598740127242658,0.0034865516344505963,0.0034944185190517998,0.0038863798819531604,-0.014763863440160504,-0.08750577833442881,0.0026646393560703706,0.062434786636141826,0.0030978218622731589,0.0031028374864446829,0.0032917963285879542,0.0035079250188421343,-0.083363446713931935,-0.089118115016494345,0.0039084056816971495,0.0040717893752623526,0.0042429627304379994,0.0044225735534953138,-0.010442912563830327,0.0048070666830489078,0.005022743422747368,0.0052379575605796709,0.0054572184315398843,0.0057028499336204243,0.0059552125176352338,0.0062198642096366842,0.0064975678551923693,0.0067916766966232061,0.0070404521625962958,0.0074336049635437317,0.0077322898951407721,0.0080437763680609089,0.0085121526978735578,0.0088758596496625493,0.0093047334888121235,0.0096760086499656037,0.010212372770412129,0.010685384130518887,0.011238259817161447,0.011686884946741159,0.012328233171098659,0.012793134993466107,0.013471334954850877,0.012547062441853732,0.00099023299842827188,0.014971944203752353,0.016095765773622647,0.016972715905028808,0.017758939106898141,0.016695917040773729,0.019395410596194901,0.020308343920634197,0.021176747469029138,0.022224940734303693,0.023219158711241136,0.023469530906936535,0.02538852668124611,0.026211261131628652,0.027634725152879486,0.028765287918312663,0.03054736323747452,0.032046069038625134,0.034017465043194542,0.036475662442709111,-0.023864244108091751,-0.024995049735704079,
		0.0012574723655029544,0.0012771049410896936,0.0015963929224972198,0.0012895700146016958,0.00068363915561668023,0.00027994040853839355,0.0011197197956712454,0.00010415940113672205,-0.00045773880992602231,-0.0005605822951848489,-0.0013139110811275418,-0.0020538728699305234,-0.0031657323666349764,-0.0029625906900585092,-0.0033630165071849112,-0.0031390929731417746,-0.0031933984114375313,-0.0035023272408173808,-0.0029766085892104833,-0.00076673973383801423,-0.0038178893353101981,-0.0039187518173412752,-0.0005652677952217971,-0.00074257923511507188,-0.00071576725343164315,-0.00072332012151239071,0.0038020295284774061,-0.00074878196381793563,0.0039523638836819353,0.0070217152672531896,0.0072013649157328403,-0.0038718058825562437,0.0075543006511251945,0.0077515556764780587,-0.0038578097957495819,-0.0039486186598896049,-0.004049006891985292,-0.0041810948750177872,-0.00045822561710302351,0.0090439956255353587,0.0064901751879573857,0.0096678921947238525,0.013289447836111757,0.0050391673619020307,0.01349388181480197,0.013552380314562632,-0.02003385845686215,-0.020017335947046005,-0.021584400476577826,0.0046325510750681743,0.005763664158581744,0.0042789897637807968,-0.022844293328713371,0.0016005615305529648,0.0016570097703780707,0.0049016939283416782,0.0057806785689710075,0.0040709119553551058,0.04004872220808537,0.003284168639709427,0.0019597426021121501,-0.0021604824538234606,0.0019677389118810101,0.0021460172844601747,0.0023276292302403388,0.0024227445795923872,0.0024756234136567861,0.0018759774632391125,0.047288097337664176,0,-0.0053265469405210089,0,0,0,0,0.0018245579562643033,0.0043466320728214195,0,0,0,0,-0.0017456782088110228,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.006778391867939753,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.00043787622853539175,0.0004470644233404263,0.0010175354348886307,0.00038928771385627551,-0.00045582752175907096,-0.00096159573448257219,7.7678874433271327e-006,-0.0011567019785525992,-0.0016995151272419457,-0.0017855726813270629,-0.0022940259921192131,-0.0025952976024050489,-0.0014836802204702911,-0.0026155369859991065,-0.0016283315603788234,-0.0025461037317861014,-0.0026602559236706719,-0.0014413695599842257,0.00038246572457112946,0.0033776189546352148,-0.0017113925441626762,-0.0017538113433351521,0.0037205433739875954,0.0036475253052204149,0.0037806219075413464,0.0038878857906061255,0.0047258528653460457,0.0041083931180416139,0.0049775747659170566,-0.0034256134136839917,-0.003153776910432437,-0.00027907019912103934,-0.003327045544129019,-0.0034214041025310772,-0.00042968331661256064,-0.00044262882909107089,-0.00045611138704990448,-0.0004704611164131276,0,-0.0040664270481066021,-0.011632109910074118,0.0089076879397310595,-5.2994140246439781e-005,-0.015189806722231899,0.00010395620262863594,-2.597378781668601e-005,0.00325569948888708,0.0035324076909340973,0.0042970912508919238,0.0011007378010613716,-0.015501983927604037,0.0012569539913561173,0.0041201901270648215,0,0,0.0014212295440533926,-0.02386994099444641,0.001685736926728833,-0.010644439096708244,0.0019320119706003451,0,0.0020099103011192742,0,0,0,0,0,0,-0.0052341747716223965,0,-0.0020845981301346587,0,0,0,0,0.0024560020023178266,0.0020119939239582308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.00042076187027097493,-0.0004217460099460271,0.00025328188262867718,-0.00052593020337983237,-0.0013281854063545255,-0.00173498510915893,-0.00099112227283132881,-0.0018628541687946392,-0.0021374824069253866,-0.0021597144649811526,-0.0021332064097171789,-0.0017791324709213031,0.0011201477758374522,-0.00074543582546783668,0.0010863833398922242,-0.00046750648738133973,-0.00059195226904626105,0.0014644273572865531,0.00299699015078041,0.0030745828791001345,0.0013869290826250865,0.0014309906786416139,0.0031017540316362513,0.0032394207680704629,0.0033079004494936202,0.0033833626660269723,-0.0027080239355895749,0.0035594901977891369,-0.0027435052614420701,-0.00018903565290664481,-0.00037069528569970303,0,-0.0003929004450562333,-0.00040480317509953434,0,0,0,0,0,-0.00048274765915528358,0.0021361875724184836,-0.0025625717368893308,-0.011538725568130534,0.0036207731855107529,-0.011488261811240923,-0.01149865779370385,0.0011645199919445744,0.0011081122934159568,0.0010133375507012576,0,0.0027232534076772584,0,0.0013012185114614943,0,0,0,-0.011611998421222135,0,0.0011296552800002858,0,0,0,0,0,0,0,0,0,-0.0019010168896358549,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.0010887154536672952,-0.0010954666497744758,-0.00049930907939230813,-0.0012100828964596022,-0.0016882084885742837,-0.0018207192525693035,-0.0016003533199564727,-0.0018153209246042805,-0.0016606438440255466,-0.0016067629520624925,-0.00099654257746779103,-0.00010653558344616114,0.0025623591285809733,0.0014182970466537356,0.0026601661939176209,0.0017158793950132912,0.0016511942394912822,0.0028842101813612493,0.0021956552534974564,-0.0021089850278689613,0.0030494264034854933,0.0031314419162595556,-0.0024330286531658732,-0.0021506316051121258,-0.0022851871389364974,-0.0023471772186041836,-0.00026343627194760352,-0.0024861853498225708,-0.00034147600020825269,0,0,0,0,0,0,0,0,0,0,0,0.00064956082319311869,-0.0088824091806328619,0.0031803635452036022,0.00086128951188481752,0.0028314597947347647,0.0028114297827858893,0,0,0,0,0.001379018735729166,0,0,0,0,0,0.020516268002307582,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.0014052833944338185,-0.0014156378054739252,-0.0010703614137161973,-0.0015010172643585634,-0.0014581489867712654,-0.0012216965314409273,-0.0016746613940619519,-0.0010796791228064881,-0.00051099563585974798,-0.00040530890468379609,0.00053511862403184335,0.0014664867864932706,0.0013316484866570109,0.0023540295188869934,0.0014968354272481619,0.0024204391145577118,0.0024676251174524837,0.0012890352618428128,-0.0014979961755948524,-0.00024016416554161393,0.0015770224162110083,0.0016160488431982247,-0.00012763024929392382,-0.00033035748554774565,-0.00029736422977282538,-0.00030582105824675384,0,-0.00032361313386114552,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0027682904690894588,0.00086714662229184127,0,0.0010363712352947781,0.0010729921483359566,0,0,0,0,0,0,0,0,0,0,-0.0038293441629993507,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.0013095868654863826,-0.0013251307572238226,-0.0013478149339497939,-0.0013496037986044467,-0.00075113972928119647,-0.00019639042790689981,-0.0012277460330346586,2.974787606082996e-005,0.00078352999885334383,0.00088665023119364984,0.0016440467864380836,0.0019319881721086318,-0.0015612285727374397,0.001114487515625934,-0.0015007664542596455,0.00083824278751341841,0.00099238192878740687,-0.001969671170848679,-0.00044488627372713712,0,-0.0017944464026103547,-0.0018469534192121428,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.00088851013579773299,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.0013014483705693597,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.00084789849610700002,-0.00087040656035849301,-0.0012880108114514592,-0.00082054598827994713,0.00017243423139843409,0.00083450636410151732,-0.00041964693904205394,0.0010458944697384544,0.0015817476824702475,0.0016253095028897397,0.0016275396126565094,0.00082928508327140586,-0.000155221541507629,-0.0012979889906430263,-0.0002788256382578395,-0.0016856326338774738,-0.0015351018322767166,9.0240945340571658e-006,0,0,-0.00025518240927393989,-0.00026228111314904282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.00016522008009415705,-0.00019396366935497792,-0.00092339674374291658,-8.192804538792636e-005,0.00095953887563949842,0.0014046781715888281,0.00047280044064581595,0.0014843927364424122,0.0013895281980359398,0.0013369566940709722,0.00035020769688040506,-0.00098986225872501341,0,-0.00033910154451710585,0,-3.4170465272719224e-005,-0.00020369782944797317,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.00052693323845200005,0.00049743222886781556,-0.00035189777394524946,0.00063457901061566245,0.0012745639695850317,0.0011833482220578375,0.0011309262056138517,0.0010553223248050394,0.00020262193207217058,7.461576656264412e-005,-0.0011767094546960004,-0.00043731526882838812,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.00099410839188000008,0.00097454230114092102,0.00027590518470810423,0.0010818589238157533,0.0009252573074794414,0.00020266250261534848,0.0012756051402631088,-9.5803097813618835e-005,-0.0010803797239085063,-0.0011796615263618174,-0.00015635512724216079,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.0010467737408741014,0.001052470478206932,0.00078879999310765359,0.0010737604166206781,3.1197672334448816e-005,-0.00084748956394535373,0.00079468668850062648,-0.0010891923917517579,-0.0001649210577242227,-4.0169484592968401e-005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.00061840771369322243,0.00066172818048420407,0.0010268166635167284,0.00056479892710420486,-0.00079454697275412132,-0.00030300027255555071,-0.00013268743074880404,8.3486948629298639e-006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.00013184755795367563,-5.678130628242247e-005,0.00089257082509008564,-0.00024380561063643331,-0.00023207622472430942,0,-0.00086811325833816531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.0007123915864045505,-0.00065656703849722043,0.00039773192316090727,-0.0007982550687125092,0,0,-0.00015750811234349759,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.00016956347611579457,-0.00026965546762462987,-0.00027100721514911324,-6.6847966135080039e-005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0,0,-0.00069236364783975177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0,0,-0.00013647202824171033,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };


static double i_COCHBA[L][M] = {6.4887934843151456,6.7870035128276873,6.81739151867,6.8273759401370162,6.8326177086766142,6.8306566478512893,6.8256706284160593,6.8257529343008789,6.8196324285643506,6.8291317221249308,6.8313419697622555,6.8295756157461351,6.8367964501229288,6.8275723549346159,6.825860024681182,6.8239070308808909,6.8187647515029548,6.8313328632373933,6.8210047822423308,6.8265511068550877,6.8194652209847204,6.8191259728205198,6.8225534729267325,6.8195684308932325,6.8216812455126243,6.8192657723094428,6.8202662294416285,6.817711436570602,6.8152939208936045,6.8156579561947135,6.8113178161873185,6.814022162218893,6.810890603854479,6.8113592891668455,6.810171467963003,6.8097182712628097,6.8090178964243968,6.8077721242640399,6.8066367891627424,6.8041387401177804,6.805309470431637,6.8055336878722441,6.8044360048303725,6.8014275003906617,6.8005996517727256,6.7989679514657411,6.7998376888771563,6.7998009442746241,6.7984523822848546,6.7974894064351865,6.7989397054129466,6.7960035819664899,6.7931718386466144,6.7924548809123895,6.7929779597050111,6.7918748705162155,6.7888288895460596,6.7895172886049551,6.7909733559634402,6.7868352664418712,6.7880636404944976,6.7919671834789499,6.7901832862919571,6.7885788708375259,6.7850142293006321,6.781766493016697,6.7830507609073054,6.7877601975353512,6.7852425090620985,6.7880747997756066,6.7875268539619809,6.7863379170889422,6.7814962924554694,6.7803614412321931,6.7849054174842056,6.7905753500352262,6.7910592157101473,6.7877025543086917,6.784836576989477,6.7837370884564292,6.789477321473405,6.7922247690789694,6.7887645982292417,6.7893595049465523,6.7920606149770739,6.7925748582193215,6.7935121779262824,6.7947131138322945,6.7960305072715244,6.797412314155741,6.7988128053945305,6.8001314996218438,6.8017900910281393,6.8031060401464449,6.8045092791068171,6.8061282135688952,6.8074829171508853,6.8090046368310135,6.8102486045733288,6.8118088549398745,6.813249959187595,6.8151193308912283,6.8168983271878156,6.8187848407240788,6.8186877323270574,6.8159285731964943,6.8137354557984455,6.820055532850736,6.8101816885788606,6.8088628242512605,6.8055544414713731,6.797864398474176,6.787923946042552,6.77806913042971,6.7624596830050656,6.7423678758540362,6.7175872246284438,6.685927079898013,6.6450029161184068,6.5944010147857099,6.5286928549675238,6.4455526872713964,6.3384549487994759,6.2002917655995544,6.0196849938216346,5.7805723281936547,5.4571786338886925,5.0068647727540707,4.3595299119310216,
		1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
		-1.5717049739700686,-1.5810044258270035,-1.4386910639208303,-1.5728135680360096,-1.7388468164950941,-1.8196192365761785,-1.6429317919137674,-1.8182601078094973,-1.9164266702713784,-1.9194165193834971,-2.0380918686352323,-2.1726239649477508,-2.4699705260260534,-2.3006414382977676,-2.4666694590237892,-2.2998814638654612,-2.3014848745100607,-2.4623537777467641,-2.6688024495281462,-2.8722785558823007,-2.4566007270150143,-2.4515089968632351,-2.8696951433172062,-2.872629937443965,-2.8665049023731499,-2.8612163279059257,-3.1274625936217766,-2.8488321836010946,-3.1167133473485746,-3.433183374156568,-3.4293378119209863,-3.8110823516298695,-3.4156367155481089,-3.4077233262359683,-3.7958422376523395,-3.7897911244377189,-3.7818714847988399,-3.7706029680603157,-4.2590935574040412,-3.3500971825246553,-3.8939452018889105,-3.4512195363416818,-3.7644281899573153,-4.1283686170819891,-3.7258227926092342,-3.7172317173930383,-4.4840622665460925,-4.51491649581736,-4.5117491531043452,-5.0218555717999793,-3.9734619201780474,-4.9849585707505515,-4.4148384684574165,-5.4992855817128552,-5.5140865668141554,-4.8939389800516988,-4.3288120593651334,-4.82128267011643,-5.312506802171618,-4.7214116586071553,-5.3970660840804454,-4.956078744264202,-5.3623235247369738,-5.3034380781441319,-5.2320885073811993,-5.1849613379215933,-5.1621346855067607,-6.3264911927142746,-5.3236523958394573,-5.9266277687987188,-5.921563396278569,-5.7506709207432554,-5.7432284865351217,-5.6637859208627406,-5.5479800424274046,-7.4207593867823887,-7.3096289211771328,-5.3782461842000471,-5.3023122432000855,-5.2227147071593452,-5.13933874754819,-5.8370126473863539,-4.960686564653912,-4.8631906399670903,-4.7632417454010039,-4.6599006681268618,-4.548756044161598,-4.43353510781456,-4.3130985720336872,-4.1872174611574264,-4.0551835144664192,-3.9288630555307487,-3.7715759526795862,-3.6293537043700876,-3.4814035776491208,-3.3002223543689677,-3.1358250138539332,-2.9557301155806037,-2.7833370360916856,-2.576384736510954,-2.3782832051030454,-2.1620912996947106,-1.9622928154905583,-1.7236514904446942,-1.5147486299299415,-1.2639767386769927,-1.2355916793753128,-0.53055955016063783,-0.56558414302918436,-0.26193508656329068,0.041642830634793238,0.3224964227216372,0.4873902763767396,0.89728062138691023,1.1992703436035308,1.4947620160496231,1.8124653204615222,2.1203511983230445,2.3764714776864442,2.7441543208566834,3.0258131641088428,3.3476040540675118,3.6381468085589859,3.955346816707094,4.2347924816265499,4.5176945086523128,4.794193135553968,3.4484245214485894,3.5386958050361286,
		-0.30529116157718905,-0.29603121459766757,-0.37675269541054468,-0.29865918593534269,-0.17545237597736851,-0.10796557030026011,-0.2490716524025347,-0.10159228962156774,-0.0080716174466637369,0.00037358077495641684,0.13337517027991264,0.30186074482853931,0.75093277784292389,0.48223866182404018,0.74836907554833143,0.4935154660201797,0.49710213817638271,0.75815401998312482,1.1320953167507217,1.5507345362522615,0.75430581604526925,0.74844895538728728,1.5648066643120111,1.5741102857564813,1.5657325886775233,1.5585208174436247,2.1952389460387964,1.5408781694664075,2.178297093170916,3.0537949113605913,3.0465297236464237,4.2745034541994986,3.0222872048022422,3.0073322043763451,4.2518723655934707,4.2431494675500989,4.2278641997306483,4.2000226422599454,6.0582868108763215,2.8998888671120064,4.5231352029487812,3.0453898852480936,4.0096044778105844,5.2863602590772567,3.9286082356897998,3.9202763144087407,6.7744224617574709,6.9243520472093767,6.912747755028871,9.280982703659344,4.9038821900568319,9.1765609670836152,6.6188318140918465,12.094482880607632,12.190800107825789,8.8589007301993377,6.1254354633833987,8.6224234636095023,10.999095320922919,8.2757526669479784,11.774364113508545,9.5852809850730853,11.656241011962763,11.418481756054799,11.133315569172662,10.948124830968784,10.880615655344034,18.033809058663742,11.353690107328744,15.656171404303151,14.969233078556286,14.840141618165628,14.836703242045182,14.483892594782798,13.963783975993907,25.37410136652101,24.698777933710019,13.287372548040826,12.981963474758171,12.666473596377855,12.341121162431779,16.20601307329801,11.661495911866394,11.299787332291713,10.937177577579522,10.570472631724654,10.183545540601905,9.7923551781999958,9.3937928358849021,8.9884532159203925,8.5754540486305473,8.1953454077471832,7.7304129957328884,7.3305908169612373,6.9296649846894827,6.4544948511928002,6.0479280199106622,5.6231671822515246,5.2398205298967744,4.8049577606940126,4.4187604475872106,4.0290399093072864,3.698639326595841,3.3421443867670595,3.0612787472988749,2.7686884078912635,2.6735522421786411,2.5873636372481452,2.1721463829398386,2.0388953609202205,1.9711008555472653,1.9606997339021528,1.9232217338653879,2.1175198437832896,2.3002931399984221,2.540231140608574,2.880077663798676,3.2769611021699654,3.6352389808493686,4.3067425348333988,4.8565246576248775,5.5858620789695079,6.3037497230974306,7.1836257928352172,8.016722909523212,8.9354810830647171,9.9044811281993272,4.3265468708976389,4.4549453378089598,
		0.31161149572152103,0.32078002969047892,0.18606630298296689,0.31471552839784966,0.48270190731564955,0.56803551811317121,0.386445243409965,0.56769460234334734,0.67200416425143317,0.67435647261884046,0.79690555417196784,0.9328185548839899,1.2014140159211726,1.0592166268893997,1.2003969294723773,1.0527035860314813,1.0539283937609008,1.1859699891458617,1.3191570064982987,1.4063569471360662,1.1815727880705662,1.1780214905637876,1.3835651971846354,1.3811643769205311,1.3763630377757823,1.3730627430276463,1.3412677939490034,1.3654870179240104,1.3366511111520099,1.0713098059698345,1.0709733726784276,0.33147491014656505,1.066654944816781,1.0661989476060141,0.31004872545281748,0.30116241675210409,0.29816227892959235,0.31014014424739411,-1.5871914462544452,1.0595388289833108,0.20313022120795443,1.1288985089310324,0.63929658781242238,-0.35148983353355634,0.63564338758936079,0.61489476788586228,-2.0718725070308306,-2.3132865392202575,-2.291692624876883,-5.893215764123612,-0.25570413153643856,-5.866045851052184,-2.0798099636923872,-12.137736575329239,-12.382849674418928,-5.5258697253599216,-1.2823141171982964,-5.329688190802699,-9.4234322813937439,-4.9618161158979905,-11.921871818455543,-7.6542432632690014,-11.791629197314624,-11.437245783142945,-11.0199775882271,-10.74116301490881,-10.698124979697489,-30.108232119273307,-10.677070874960126,-23.805771063032367,-19.659223907771981,-22.1505546344249,-22.218073802950585,-21.529469053948709,-20.49004947515224,-52.342055500801379,-50.480052848812278,-19.315101868674908,-18.766648862191644,-18.204720902651562,-17.630190480359687,-27.465808347862605,-16.446247302066467,-15.822859717282618,-15.206292740057043,-14.590191937589253,-13.943526074235344,-13.29763231666076,-12.646615159176491,-11.99168983853971,-11.331246392275153,-10.739439269340794,-10.000827949526016,-9.3882523929165167,-8.7800580732612872,-8.0459781838216866,-7.4388216329595194,-6.8028936621675831,-6.2416902901036071,-5.5880568707847038,-5.0165682181026723,-4.4294644840785358,-3.9398267657114809,-3.3778497553551721,-2.9425148976977464,-2.4383005126490369,-2.47540132712414,-1.2444135148973492,-1.27411622754633,-0.80358393244381909,-0.3578003938456602,0.022930917152892638,0.16197706526442879,0.78658170433157204,1.2056282960887126,1.6272607366604643,2.1348164788713735,2.6621521344971812,3.0830387190105153,3.9316753184037738,4.5755517819515772,5.4775917139382146,6.3668138714777713,7.5236913911983434,8.6397563101609904,9.9363026408963382,11.37155410320303,1.7972446369663206,1.7134038070481441,
		0.49502073305415784,0.4979868062064724,0.40277547983521655,0.49235240714464257,0.58306131699823238,0.62325136981673923,0.5349503057753362,0.61538059593391303,0.64880436817686093,0.64344137542585234,0.65843210998297586,0.64899332361439566,0.50999986870826275,0.61064663199862812,0.50521441805557255,0.59377988975554763,0.59182261765296684,0.48455496113961893,0.27375872123128875,-0.028051504060927268,0.48160072950881105,0.4819996221815408,-0.049983238135881347,-0.058357900834280496,-0.05589646141790916,-0.05409530836219667,-0.58941149814915494,-0.048150003664679142,-0.58316630178448314,-1.3786861771331673,-1.371507340190437,-2.4409202228114255,-1.3595542062459174,-1.3518097810766219,-2.4126232419743063,-2.4034772866833389,-2.3880452170646911,-2.3748777741191089,-3.3405766941722614,-1.29035780118285,-2.5468579090712624,-1.253871036949616,-2.0671189950039763,-3.0161153526988933,-2.009041079310852,-1.9992866464200301,-3.6535483799722996,-3.5904123917820221,-3.6104504597544205,-3.1114451248984434,-2.7108638015422795,-2.936511257844324,-3.4768949259770769,2.0664970234257787,2.3717542221846637,-2.9227697650496856,-3.3085409527970695,-2.7897762562691621,-0.92122366496809427,-2.7529630665121645,2.4335494145749581,-0.95115437702882133,2.4186482143990102,2.2565874411036768,2.0875449180426013,1.9255266416205004,2.0002362727442637,32.096659857632396,0.61729763081012612,22.463842298045797,11.165837180727923,20.602530304003473,20.779151490202217,20.033575059358338,18.867380790582867,71.674823633277839,68.647823973702671,17.767301570045678,17.220457389142823,16.662731423836284,16.095240659571942,30.909505566310088,14.934573775522637,14.325187076989035,13.728802431106104,13.13776957022041,12.516345195770331,11.900553293612655,11.283488576689471,10.666400854127684,10.047382286543703,9.5081203576309168,8.811162687980282,8.2559718040963688,7.7081635366707237,7.0305795429083764,6.4912939363666089,5.9261595674806582,5.4405732007427714,4.8689867432313818,4.3843857017810421,3.8939247779715522,3.4990586552514058,3.0553467260675053,2.724919964262003,2.3622442832923047,2.299262670363265,2.4070830524030065,1.6058359602515171,1.396316125438521,1.2512372559962175,1.1596813269313251,1.0313329146387151,1.1172598709071127,1.1803378012008992,1.2848978761472178,1.4816562473058383,1.7229259516146413,1.8978247347244941,2.435007431176941,2.8130339495956278,3.420835106340788,4.0220181971154796,4.8667771705053564,5.6811881792367185,6.6695835104252685,7.8006412679578103,-0.86083303468851935,-1.1109360735374543,
		0.42147365761329664,0.41761808157509323,0.39906095499707411,0.41459216775886121,0.39349129884253775,0.370177481480923,0.41045714355626134,0.36027457232812543,0.31276723587184913,0.30417123118105377,0.21630278054405194,0.087788646951972638,-0.30835747702724847,-0.068236698423167153,-0.30704399194457577,-0.079771840466338118,-0.082935799174187919,-0.31211884204385665,-0.62662687223307822,-0.97213001674816613,-0.31249180981028646,-0.30987691475383949,-0.96489053639073807,-0.9689744711801439,-0.96183900852245596,-0.95871057767427037,-1.3072863044231076,-0.94852615639847659,-1.2983936926913897,-1.4591543995609908,-1.4616833916297167,-0.99915796788784961,-1.4445037621469476,-1.4392194758367474,-0.96569024100530954,-0.94609840479361373,-0.9428114119439005,-0.94185391523085982,1.2246209967665522,-1.3968106481196623,-1.0480436369075947,-1.4985400931492334,-1.4088804223411389,-0.67633005191978479,-1.3584539308739951,-1.3282708254880393,1.0825023530506552,1.2914114238451493,1.2773539068219968,4.955325592895317,-0.63310417313242739,4.83160886728189,1.1634089530834597,7.7926409159561274,7.6193166012586913,4.6114825150724101,0.0094363213260002521,4.398702129450573,7.1360642921304489,4.1333859906082342,7.0866673348867684,6.1863004265267918,7.0282862708152489,6.8712186974028233,6.6401235545688024,6.6028144849477401,6.4632800535884432,-22.309680054764538,7.0087729284325935,-13.149500442679143,4.6099832839985959,-11.930815242046824,-12.128589655171428,-11.659819637788779,-10.88808714890024,-67.513079731749414,-64.353153240896603,-10.3280871723301,-10.015220826643718,-9.6965912106585055,-9.3728893406473262,-23.587345274065342,-8.7122849060187981,-8.363342126206458,-8.0250409023887403,-7.691651434993549,-7.3370757849595414,-6.9870467562687821,-6.6362544424995091,-6.2852531148219892,-5.9322631111389441,-5.6366691337714716,-5.2240654674573817,-4.9136795363410588,-4.606679190936382,-4.1996491275134513,-3.8922612388797484,-3.5608221468707968,-3.2856248579311904,-2.9365430913014654,-2.6483876210773136,-2.3456138909825524,-2.1138334133944152,-1.8248810328528833,-1.6278261647524106,-1.3779654948939914,-1.5075174465937935,-0.94126948641839903,-0.87509492342963424,-0.65700907216697413,-0.45967048405639355,-0.31428830047093759,-0.31732394990010482,-0.051962460267205857,0.082981857029806316,0.20406621062032188,0.35837368748382653,0.50513426482499058,0.57900520008910661,0.86019009714714934,1.0147066922305596,1.2883313392618208,1.5394593699756625,1.9142098438862458,2.2575486223449754,2.6861897220216528,3.1824261549738164,-1.1509335764432249,-1.3062467260699331,
		0.22604417720471265,0.21823167357024031,0.27474490887347802,0.21833493950316063,0.1071518031301284,0.036522771838368273,0.17381957938135201,0.030489454236642954,-0.067662784327437664,-0.073248311593901549,-0.20570396454333417,-0.36500022309593005,-0.71215001438705949,-0.52857419836512698,-0.71204023647941339,-0.52215307033927905,-0.52440516064876574,-0.69387455919634022,-0.84156968771932583,-0.88365293102140685,-0.69096676343934627,-0.68854419974031122,-0.8501296175499411,-0.8447874908048072,-0.84179101642144016,-0.83685408276356632,-0.58332409802853635,-0.83135403554560428,-0.57809949000912564,0.18942833056147423,0.18536019022185291,1.6694520925855239,0.1826779394764757,0.18499811131884913,1.6469617762170516,1.6328930066698419,1.6299048990129137,1.6129892610143188,2.82742329122798,0.17618392367467639,1.5600318274828129,-0.16431532838873952,0.72702480147560122,2.045408182854731,0.70192831196455152,0.70866804735929656,3.1833972484412865,3.04035417539842,3.0852447260647331,1.6283069051501993,1.7964601614920681,1.4455744447195156,2.9413251829813687,-8.3139402514975558,-8.3078085466840186,1.4757483899398802,2.4419598221821674,1.3515252555422179,-1.7577705149172675,1.3344726805528226,-7.8809662550969275,-3.7000609718533544,-7.8686021317090251,-7.6263113511902541,-7.293941880043544,-7.1956737228857932,-7.1121251215534462,9.8465128323186981,-3.0365071211535808,4.4246457054255579,-12.912864176035047,3.9855387675807341,4.0951337292198566,3.9341999894898092,3.6492040154223973,43.735721102417962,41.575431678473507,3.5184588778185484,3.4244114926317932,3.3285664202200538,3.231136737347823,11.932360089895241,3.0320214566179899,2.9250594754999022,2.8227121170901075,2.7224978324313613,2.6131497475075673,2.5054606664545438,2.3970048663611205,2.287842606765492,2.1770012363828042,2.0903848997724515,1.9510414356460934,1.8553642635815903,1.7596186177733433,1.6173860816895813,1.5174718612016154,1.4045313255852176,1.3141352680127392,1.1884601644349804,1.0871404266097657,0.97712768403781813,0.89464050347561452,0.78670947423591531,0.71288938535102186,0.61835585820766825,0.63179374501196472,0.92620015087620411,0.4090070142371246,0.33452577421977703,0.27438792371264459,0.22642381451221189,0.16998403858065603,0.15382717313853461,0.13248267445740294,0.11696028205792047,0.12000272615295995,0.12833900387915562,0.11643299060840601,0.18172393806801102,0.2033133281380316,0.26850684800913188,0.32370446924168511,0.41837184112679282,0.49687163729617811,0.59744525375724178,0.71182904263151747,-0.42053261207283099,-0.44922874363020571,
		0.0081150369853058013,-0.00029934966795996942,0.10534916961194651,0.0023183309501969562,-0.14949145322603274,-0.23489262073252015,-0.063666221879063345,-0.23400573811461967,-0.33390493159946222,-0.33320296513309622,-0.43796130543729328,-0.53396248043604966,-0.59503636824436867,-0.59908220496246123,-0.58402971780883839,-0.58020155124205675,-0.57949214194575205,-0.5612848793079368,-0.40927634313937561,-0.064492988993033684,-0.55754860629418468,-0.55548722367098424,-0.039035006287172713,-0.03060662828640015,-0.031265566552143631,-0.031676885866303461,0.6202955372537351,-0.032500700976147656,0.6158078969303451,1.400942753461345,1.4042326939779701,1.3837848387659115,1.3907464350864875,1.3794046412173371,1.3435396306767786,1.3263935705858356,1.3085344544269897,1.314774837205021,-2.5649632339004986,1.3226230197708406,1.6223007253061594,1.0829678364529935,1.6531956735480717,1.5246237050801927,1.5775521897536966,1.5497829101760261,-0.56275576819606132,-0.69290225825191287,-0.69626091013818647,-5.3826581386420953,1.3227017405053605,-5.0844682569200899,-0.64967210063533654,3.6033780508801962,3.64149922594205,-4.9591422333741857,1.1558804447539335,-4.6346154389177734,-5.5507548958437685,-4.367062476049977,3.5170875949101399,-0.12798405384386236,3.5431423566685307,3.4228987840679506,3.2564219335271449,3.2100201412766678,3.195036298028235,-2.514628945749358,-4.7403568581996511,-0.66195838170181032,9.8457424369540494,-0.59401375912612109,-0.61924678372177,-0.59595689975055843,-0.54985145183635464,-18.797977132421195,-17.858068828448495,-0.54521436166016646,-0.53473827174103183,-0.52409067567111622,-0.51330539971349076,-3.6713848318621105,-0.49138929030424539,-0.47918073059090133,-0.46802500502722222,-0.45745002017308301,-0.445097571372993,-0.43317621495775194,-0.42116097606480163,-0.40903870836724443,-0.39655254346844954,-0.38980245066633923,-0.37042657347423702,-0.36155722730825057,-0.35278940786270174,-0.33141986637534526,-0.32107719634041393,-0.30668426608446053,-0.29876196672600563,-0.27896892447541788,-0.26620510990601526,-0.24911389896420869,-0.24169241984779707,-0.22195819413224124,-0.21660318614073851,-0.19836720301566266,-0.25595936144272086,-0.2280382471948928,-0.17735905022128262,-0.15345205257284614,-0.13039394414612693,-0.11732444949478212,-0.13143527527767471,-0.092691260646873316,-0.078536664251413271,-0.067351588737241688,-0.051406222346576394,-0.038768690960491202,-0.036740858790950549,-0.012716212855206783,-0.0059040566019771959,0.0093801769235569554,0.019368375549130817,0.034702074455854506,0.044414060188321135,0.0557925180617663,0.067129474456903052,-0.054225828864735884,-0.052305551666179749,
		-0.16918769981706866,-0.17436160893315844,-0.055545622929681016,-0.16988815017414322,-0.30452504880310438,-0.36913892271281529,-0.23297824354364682,-0.36070180218391923,-0.41728421178153896,-0.41115668470256234,-0.43527676855583625,-0.41374485447052994,-0.108889295238765,-0.32699476368159008,-0.11563246268946503,-0.30712498935225441,-0.30457985299663509,-0.09526338444081861,0.26866815564656565,0.734803928563731,-0.091113630848329352,-0.090807523805579771,0.71821267316064175,0.71975127725115728,0.71500624663305856,0.71225838244998252,1.0497025261046746,0.70559187993798012,1.0415013712235843,0.54185156850257832,0.54831387495706196,-1.9954761495933053,0.53574870515841189,0.53373703489090463,-1.9572869079239656,-1.938671112867361,-1.9223678293728899,-1.9205511264961066,0.64168384782557131,0.51781564039279737,-0.84951926016324775,1.0572536283571965,0.44570962277975579,-1.3098107594511108,0.42327108309066752,0.39285237406328244,-3.1672829195735934,-2.9721934686550227,-3.0325703170003839,3.1850214233678313,-1.1451564403975176,3.0305097050538876,-2.8637702140258274,-0.60585238170005773,-0.61845419349951192,2.9576336235525531,-1.5168644168898502,2.7670130192831595,5.872367827833453,2.5853086734975848,-0.61142180154628534,0.85787910354698682,-0.62343956385043631,-0.60164771098526093,-0.57046172794774974,-0.56351554274459426,-0.56554283618334822,0.28321382801825912,6.1776739417606628,0,-3.6653523711039169,0,0,0,0,4.8700067969653809,4.6337558647767052,0,0,0,0,0.53317249425331825,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.11489180789592754,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.26963566588790328,-0.26956525067268239,-0.17427981952077343,-0.26518943891210833,-0.33516220906839433,-0.3523897956783682,-0.3040042605560086,-0.33958569952274209,-0.32461658403552751,-0.31535701005036981,-0.2439202012247747,-0.1045441871530165,0.3922176797000026,0.098471648556967661,0.39670680980877604,0.10518637774931094,0.10834816510594036,0.38575163826876796,0.68607559175069721,0.78630120164089479,0.38798940756828137,0.38590534766485085,0.74339724976326294,0.738263452518648,0.73330516307184812,0.72925732379056663,0.12143289340608765,0.72207914616508151,0.11720814390134293,-1.5060814267961731,-1.5170006623099486,0.58751725084719353,-1.4969560810424554,-1.4891580491476093,0.57918005557184327,0.57462889321375232,0.57085467406789581,0.57022566532998697,0,-1.4416101193682742,-1.8457415208435632,-0.1262592225841429,-1.3287759024700916,-1.8673527464600566,-1.268819661176581,-1.2473782422943338,2.4641323454180082,2.381431311982249,2.4364956298446221,-0.64044272420606219,-1.5608060380573114,-0.61222250937185985,2.3016414104996974,0,0,-0.60194774239613735,-1.7654110230609208,-0.56402645902091908,-2.4238406516018638,-0.52499613447545679,0,-0.23898648626258762,0,0,0,0,0,0,-2.8959336885820921,0,0.56998934512740984,0,0,0,0,-0.58078114703757855,-0.55488561001733538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.2827409188131883,-0.27886382865068909,-0.23391340402532756,-0.27468029737331173,-0.25400370744563078,-0.21180314224150665,-0.27548095778668835,-0.2007869176426591,-0.1156677476888629,-0.10701545526453915,0.036728637923866159,0.22841444881928097,0.60789393770481603,0.44041693253666081,0.60257821063223282,0.42584079976597711,0.42687876685315895,0.57269849867401801,0.4907831198087525,-0.090806264783213964,0.56865134609521295,0.56648922933053081,-0.10686254673434281,-0.11344820825182544,-0.11137943627511759,-0.1131524786392365,-1.1984552446487147,-0.11294028469419393,-1.1883194507908246,0.51988591002259277,0.52424796701092402,0,0.51871651809029307,0.5164544538653606,0,0,0,0,0,0.50342492127004201,1.6758020825561255,-1.1516802916172946,-1.0441068129684703,2.0291761375956385,-0.9774662865160928,-0.93513794854835308,-0.56487411737240034,-0.55379602517942272,-0.56909826804047681,0,1.7106783841099991,0,-0.54011200599527109,0,0,0,0.85101542817846731,0,0.38254164513180944,0,0,0,0,0,0,0,0,0,0.5181891251320121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.21894083639088927,-0.21155938850965886,-0.23207090696379346,-0.20923203333547538,-0.099946366397570485,-0.0096052903384636901,-0.16917063138711025,-0.0035577056808309693,0.12403560355749632,0.12639351212645933,0.27894869539544465,0.42283165602538819,0.32988746415124331,0.48864739240275679,0.32637940762584061,0.4623108601020669,0.46192000199368427,0.29909264719798512,-0.24197271147347749,-1.0316893484313789,0.29459806464833005,0.29249917476430454,-0.97179050845561177,-0.96700309955114405,-0.96179883007586509,-0.95512333669055116,0.47810180803467617,-0.94613329450300654,0.47536738374879983,0,0,0,0,0,0,0,0,0,0,0,-0.40008374651408107,-0.54359632686305115,1.6236860120646841,-0.53608730831686469,1.5308899522971333,1.4888451096603865,0,0,0,0,-0.45432807449747753,0,0,0,0,0,1.987358043402339,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.10222819257523952,-0.094038528673973665,-0.17762923873507527,-0.094025960373504358,0.075399668578658319,0.18605078366640287,-0.022393305892024096,0.18144528901180662,0.29996929272164496,0.29421654857823953,0.37635650356541722,0.36623587378896683,-0.30795871450668533,0.17858219135806136,-0.30441211009601044,0.16026973444186976,0.15802283843513915,-0.29484844474230887,-0.79845969176131648,0.46495074116188478,-0.29838245656041773,-0.29700005446561806,0.44248014827944177,0.44260790503532588,0.440174410322348,0.43785578963640642,0,0.43457815824967322,0,0,0,0,0,0,0,0,0,0,0,0,0,1.3157365118839057,-0.48518000301487318,0,-0.4582057868953392,-0.44791033925067136,0,0,0,0,0,0,0,0,0,0,-1.8163393967029693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.034837587604876985,0.040518043358476918,-0.08741309882031828,0.038398951992634822,0.21515119155400209,0.30165250521063958,0.12200071786325722,0.28855585565957764,0.33661807778231301,0.32477878227363399,0.26968112992190257,0.057997509805751579,-0.69207118402032097,-0.33824959364593865,-0.692064625655604,-0.32368530479776142,-0.3263184556418014,-0.64392918312296832,0.41622551527187512,0,-0.63949864011851609,-0.63664494479702427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.44071133826776865,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.44755885430297476,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.15533482646657401,0.15654631988983425,0.016566816112148663,0.15287585038017276,0.27383339040647181,0.28880611822438118,0.22165457480727263,0.27312714765146429,0.20206042508572727,0.19160001381553224,-0.014719097954588201,-0.34189619288286066,0.4021164293176967,-0.57268436681465085,0.40228821511473534,-0.53472437623670688,-0.534107371441356,0.37751759001964869,0,0,0.37799586910114003,0.37663832853983298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.22680555139686204,0.22320839727583963,0.11138031186490543,0.21863453839645836,0.22483387090164197,0.13895137443493516,0.2446971129931092,0.12784278872159788,-0.063238333372651279,-0.065181454787000714,-0.3299061508845994,-0.45854001830918645,0,0.37629098603691108,0,0.35400163313679278,0.35537900492387031,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.22596354079868999,0.21876223639317763,0.17550087666173375,0.21460450576518728,0.074269670475899274,-0.10306386488239311,0.17751125532807352,-0.10101131646092265,-0.32591332827278036,-0.31496942212094475,-0.37826841870032435,0.34341725165651521,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.14635009313293601,0.1381999857905605,0.19294048417732715,0.13581249498375147,-0.12959817972420884,-0.31649885034425745,0.032417973332592942,-0.29850855432904422,-0.33316549966108933,-0.31726419094887814,0.31716900076524651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.0032107473745937032,-0.0018654709977761197,0.15603859927937175,-0.0012089956207610997,-0.28558940666938643,-0.28899816977201964,-0.14381555029751847,-0.26836382084290689,0.30974217087821737,0.29753849982950825,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.15849617372087846,-0.15706714779600614,0.069016177029977033,-0.15311714339126523,-0.22980425862768281,0.30056693487183372,-0.26432138319783216,0.28161766147998341,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.25870922328816448,-0.25037759105005741,-0.048905806022614073,-0.24452794040570316,0.27256783039254345,0,-0.19343520420790236,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		-0.17593787832252844,-0.16699992616331516,-0.1611891898749723,-0.163142702131506,0,0,0.25739171526136234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0.25814038910565346,0.25022345964424275,-0.21058729198344872,0.24390328408068374,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0,0,-0.11699958892165956,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
		0,0,0.2246143515635951,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };

	if (part == 'r')
		return r_COCHBA[l][m];
	else if(part == 'i')
		return i_COCHBA[l][m];
	

}

typedef struct _wav2aud {
        t_object x_obj;
        
        // parametros do algortimo 
        t_float frmlen; 
        t_float tc;
        t_float fac;
        t_float shft;
        t_float filt;
        t_float VERB;
        t_float alpha;
        t_float beta;
        t_float L_frm;
        t_float N_frames; // N no codigo matlab
        
        // leitura da array
        t_word *x_vec;
        t_symbol *x_arrayname;
    	int x_array_points;
                
        // buffer
        float *v5; //v5[frame][channel]
        t_atom *frame_out;
        
        // outlets
        t_outlet *x_list;
        t_outlet *number_of_frames;
               
                    
        
}t_wav2aud;

/*********************** INTERNAL FUNCTIONS  *******************************/
void wav2aud_normalize_coef(double *vectorA, double *vectorB, t_floatarg size,  t_floatarg coef){
	
	int i;
	double max=0 ;
	
	if(coef!= 1){	
		for(i=0; i<size; i++){
			if(max < vectorA[i]) max = vectorA[i];
			else if(max < vectorB[i]) max = vectorB[i];
			}
		for(i=0; i<size; i++){ vectorA[i] = (vectorA[i]/max)*coef; vectorB[i] = (vectorB[i]/max)*coef;}
		}
}


// based on http://mechatronics.ece.usu.edu/yqchen/filter.c/FILTER.C   from    http://mechatronics.ece.usu.edu/yqchen/filter.c/    

static void wav2aud_filter(double *y, double *wav, double *B, double *A,  t_floatarg size, t_floatarg size_coef){ 
	
	int i,j;	
	
	wav2aud_normalize_coef(A, B, size_coef, A[0]);
	
	y[0]=B[0]*wav[0];
	for (i=1;i<size_coef;i++){
	    y[i]=0.0;
	    for(j=0;j<i+1;j++)y[i]=y[i]+B[j]*wav[i-j];
	    for(j=0;j<i;j++) y[i]=y[i]-A[j+1]*y[i-j-1];
	}
	for (i=size_coef;i<size;i++){
		y[i]=0.0;
	    for (j=0;j<size_coef;j++)y[i]=y[i]+B[j]*wav[i-j];
	    for (j=0;j<size_coef-1;j++)y[i]=y[i]-A[j+1]*y[i-j-1];
	}
	
	
}

static void wav2aud_sigmoid(double *y1, t_floatarg fac, t_floatarg size){ 
	
	int i;
	
	if(fac > 0) 
		for(i=0;i<size;i++) 
			y1[i] = 1.0/(1+exp(-y1[i]/(double)fac));
	else if(fac == 0) 
		for (i=0;i<size;i++)y1[i]= y1[i]>0;
	else if(fac == -1) 
		for (i=0;i<size;i++)if(y1[i]<0)y1[i]=0;
	//else if(fac == -3)
		// halfgru() - implementar.
		
	
}


static void wav2aud_last_channel(t_wav2aud *x, double *y1, double *wav, t_floatarg size){
	int i;
	double pos, coefA[2]={1, -x->beta}, coefB[2]={1, 0};
	double *real, *imag;
	
	pos = COCHBA('r', 0, M-1)+1;
	real = (double *)getbytes(pos*sizeof(double));
	imag = (double *)getbytes(pos*sizeof(double));
		
	for(i=0; i < pos; i++) real[i] = COCHBA('r', 1+i, M-1); 
	for(i=0; i < pos; i++) imag[i] = COCHBA('i', 1+i, M-1); 
	
	wav2aud_filter(y1, wav, real, imag, size, pos);
	wav2aud_sigmoid(y1,x->fac,size);
	
	if(x->fac != -2) wav2aud_filter(y1, y1, coefB, coefA, size,2);
	
	freebytes(real, pos*sizeof(double));
	freebytes(imag, pos*sizeof(double));
	
}


static void wav2aud_other_channels(t_wav2aud *x, double *y1, double *wav, t_floatarg size){
	
	int ch,i,j,index, frame;
	double avg, pos;
	double coefA[2]={1, -x->beta}, coefB[2]={1, 0}, coefA2[2]={1, -x->alpha};
	double *real, *imag, *y2, *y3, *y4, *erase; 
	
	y2 = (double *)getbytes(size*sizeof(double));
	y4 = (double *)getbytes(size*sizeof(double));
	erase = y2;
	
	for(ch = M-2; ch >= 0; ch--){
		pos = COCHBA('r',0, ch)+1;
		real = (double *)getbytes(pos*sizeof(double));
		imag = (double *)getbytes(pos*sizeof(double));
		
		for(i=0; i < pos; i++) real[i] = COCHBA('r', i+1, ch); 
		for(i=0; i < pos; i++) imag[i] = COCHBA('i', i+1, ch); 
			
		wav2aud_filter(y2, wav, real, imag, size, pos);
		wav2aud_sigmoid(y2,x->fac,size);
		
		//CONSERTAR ESSE ENTRADA E SAIDA NAO PODEM SER IGUAIS !!!!!!!!!!!!!!!!!
		if(x->fac != -2) wav2aud_filter(y2, y2, coefB, coefA, size, 2);
		
		// masked by higher (frequency) spatial response
		for(i=0; i<size; i++) y1[i] = y2[i]-y1[i];
		y3 = y1;
		y1 = y2;
		y2 = y3;
				
		// halfwave rectifier
		for(i=0; i<size; i++) if(y3[i] < 0.0) y3[i]=0;
				
		//temporal integration window
		if(x->alpha){ // leaky integration
			wav2aud_filter(y4, y3, coefB, coefA2, size, 2);
			for(i=0; i < x->N_frames; i++){
				index = (int)((i+1)*x->L_frm)-1;
				frame = (int)(i*(M-1));
				x->v5[frame+ch] = (float)(y4[index]);
				}
			}
		// short-term average
		else if(x->L_frm ==1){
			for(i=0; i < x->N_frames; i++){
				frame = (int)((M-1)*i);
				x->v5[frame+ch] = y3[i];
			}
		}
		else{
			for(i=0; i < x->N_frames; i++){
				frame = (int)(i*(M-1));
				avg = 0;
				for(j=0; j< x->L_frm;j++){
					index = (int)(i*x->L_frm)+j;
					avg = avg + y3[index];
					avg = avg/x->L_frm;
					}
					x->v5[frame + ch] = avg;
				}
		    }
			
		freebytes(real, pos*sizeof(double));
		freebytes(imag, pos*sizeof(double));
			
		}
	
	freebytes(erase, size*sizeof(double));
	freebytes(y4, size*sizeof(double));
	
}


/******************* BANG MESSAGE ***************************************/

static void wav2aud_bang(t_wav2aud *x) {
	
	int i;
	float pad_size;
	double *wav, *y1;
	t_garray *a;

	// access array
	if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class)))
        pd_error(x, "%s: no such array", x->x_arrayname->s_name);
    else if(!garray_getfloatwords(a, &x->x_array_points, &x->x_vec))
    	pd_error(x, "%s: bad template for tabletool", x->x_arrayname->s_name);
	else	{	
		
		x->N_frames = ceil((t_float) x->x_array_points / x->L_frm); // number of frames
		pad_size = x->L_frm * x->N_frames;	// zero-padded: array's new size
		
		wav = (double *)getbytes(pad_size*sizeof(double));		// buffer for array data (original signal)
		y1 = (double *)getbytes(pad_size*sizeof(double));				// buffer for filtered signal (last channel)
		x->v5 = (float *)getbytes((x->N_frames * M-1) * sizeof(float));// allocates final data buffer
		
		for(i=0; i<pad_size; i++) {
			if(i<x->x_array_points) wav[i] = x->x_vec[i].w_float; // copy array
			else wav[i] = 0; //zero padding
			}
		
		// return number of frames.
		outlet_float(x->number_of_frames, x->N_frames);
		
		wav2aud_last_channel(x, y1, wav, pad_size);
		wav2aud_other_channels(x, y1, wav, pad_size);
			
		// free local memory
		freebytes(y1, pad_size*sizeof(double));
		freebytes(wav, pad_size*sizeof(double));
		}
	
    
}

/****************************** METHODS FOR DATA ACCESS  **********************************/


static void wav2aud_get_frame(t_wav2aud *x, t_floatarg index){
	
	if( (index >= 0) && (index < x->N_frames)){
		int i, frame;
		frame = (int)((M-1)*index);
		for(i=0; i < M-1; i++) SETFLOAT(x->frame_out+i, x->v5[frame+i]); // copy collum
	
		outlet_list(x->x_obj.ob_outlet, gensym("list"), M-1,  x->frame_out);	
	}
	
}

static void wav2aud_get(t_wav2aud *x, t_floatarg frame, t_floatarg channel){
	
	if ( (frame>=0) && (frame < x->N_frames) && (channel>=0) && (channel < M-1)){
		int i, f;
		f = (int)(frame*(M-1));
		i =(int)channel;
		post("value = %F", x->v5[f+i]);
	}
	
}
		
/************************** OBJECT CREATION AND SETUP *************************************/


static void wav2aud_free(t_wav2aud *x){
	
	
	freebytes(x->v5, sizeof(float)*(x->N_frames*M-1));
	freebytes(x->frame_out,M * sizeof(t_atom));
	
}

static void *wav2aud_new(t_symbol *s, int argc, t_atom *argv){
     t_wav2aud *x = (t_wav2aud *)pd_new(wav2aud_class);
     
  
   // arguments: audio table,frameLength, timeconstante (leakyIntegr), nonlinear factor,  octave shift.   
  	switch(argc){
	case 5:
		x->shft = log2(atom_getfloat(argv+4)/16000.0);
		x->fac = atom_getfloat(argv+3);
		x->alpha = exp(-1/(atom_getfloat(argv+2) * pow(2, 4+x->shft)));
		x->L_frm = round(atom_getfloat(argv+1) * pow(2, 4+x->shft));
		break;
	case 4:
		x->shft = -0.415037;
		x->fac = atom_getfloat(argv+3);
		x->alpha = exp(-1/(atom_getfloat(argv+2) * pow(2, 4+x->shft)));
		x->L_frm = round(atom_getfloat(argv+1) * pow(2, 4+x->shft));
		break;	
	case 3:
		x->shft = -0.415037;
		x->fac = -2;
		x->alpha = exp(-1/(atom_getfloat(argv+2) * pow(2, 4+x->shft)));
		x->L_frm = round(atom_getfloat(argv+1) * pow(2, 4+x->shft));
		break;
	case 2:
		x->shft = -0.415037;
		x->fac = -2;
		x->alpha = exp(-1/(8.0 * pow(2, 4+x->shft)));
		x->L_frm = round(atom_getfloat(argv+1) * pow(2, 4+x->shft));
		break;		
	case 1:
		x->shft = -0.415037;
		x->fac = -2;
		x->alpha = exp(-1/(8.0 * pow(2, 4+x->shft)));
		x->L_frm = round(8 * pow(2, 4+x->shft));
		break;
	case 0:
		x->shft = -0.415037;
		x->fac = -2;
		x->alpha = exp(-1/(8.0 * pow(2, 4+x->shft)));
		x->L_frm = round(8 * pow(2, 4+x->shft));
								
	}
  	
	x->beta = exp(-1.0/(0.5 * pow(2, 4+x->shft)));
  	 	
 // acesso a array copiado do tabletool do brent 	
	t_garray *a;
 		
  		if(atom_getsymbol(argv))
  		{
  			x->x_arrayname = atom_getsymbol(argv);

  		    if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class)))
  		        pd_error(x, "%s: no such array", x->x_arrayname->s_name);
  		    else if(!garray_getfloatwords(a, &x->x_array_points, &x->x_vec))
  		    	pd_error(x, "%s: bad template for wav2aud", x->x_arrayname->s_name);	
  		}
  		else
  			post("WARNING: no array specified.");
  		
  	// allocate memory for frame output as list
  		
  	 x->frame_out = (t_atom *)getbytes(M * sizeof(t_atom));	
  		
  // cria os outlets
  	 x->x_list = outlet_new(&x->x_obj, gensym("list")); 
  	 x->number_of_frames = outlet_new(&x->x_obj, gensym("float"));
     
     return (void *) x;
}

    
void wav2aud_setup(void) {
     wav2aud_class = class_new(gensym("wav2aud"), (t_newmethod)wav2aud_new, 
     (t_method)wav2aud_free, sizeof(t_wav2aud), CLASS_DEFAULT, A_GIMME, 0);
      
     //class_addlist(kmeans_class, kmeans_list);         
    class_addbang(wav2aud_class, wav2aud_bang);
    class_addmethod(wav2aud_class, (t_method)wav2aud_free, gensym("clear"),0);
    class_addmethod(wav2aud_class, (t_method)wav2aud_get_frame, gensym("get_frame"),A_DEFFLOAT, 0);
    class_addmethod(wav2aud_class, (t_method)wav2aud_get, gensym("get"),A_DEFFLOAT, A_DEFFLOAT, 0);
 
}

